<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<link
href="${ctx}/assets/sea-modules/jscal2/jscal2/1.9/css/jscal2.css?v=${version}"
rel="stylesheet" />
<a name="top"></a>
<!--服务说明-->
<div class="container">
	<div id="start-content">
		<div class="start-content" id="tabs-858155">
			<div class="start-tab">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#panel-308006" class="tab1 t1" data-toggle="tab">服务说明</a></li>
					<li><a href="#panel-473511" class="tab2 t2" data-toggle="tab">个人成就</a></li>
					<li><a href="#panel-473513" class="tab2 t4" data-toggle="tab">服务设置</a></li>
					<li><a href="#panel-473514" class="tab2 t5" data-toggle="tab">验证提交</a></li>
				</ul>
			</div>

			<div class="tab-content start_tab_content">
				<div id="loading-load" style="display: none; text-align: center; color: #834313;"></div>
				<div class="tab-pane active clearfix" id="panel-308006"	style="position: relative;">
					<div class="start_pro_left">
						<div id="error"	style="position: fixed; top: 50%; left: 45%; z-index: 10000; text-align: center; width: 120px; padding: 0px;"></div>
						<h4 class="tab-cont-title">服务说明</h4>
						<form id="startProjectForm">
							<input type="hidden" value="${project.id }" name="id"id="startPid"> 
							<input name="status" value="0" type="hidden"> 
							<input name="type" value="0" type="hidden"> 
							<input name="institution.id" value="${institution.id}" id="institution_id" type="hidden">
							<table class="table">
								<tr>
									<td><!-- <span style="color: #e00">*</span> -->服务名称</td>
									<td><input type="text" name="name" id="name"
										placeholder="请控制在30个字符以内"
										class="activity-name form-control required"
										value="${project.name}" />
									</td>
								</tr>
								<tr>
									<td>服务地址</td>
									<td>
										<div class="controls">
											<input type="hidden" id="region-province-id"
											name="provinceRegion.id" value=""> <input
											type="hidden" id="region-city-id" name="cityRegion.id"
											value=""> <input type="hidden" id="region-county-id"
											name="districtRegion.id" value=""> <select
											id="region-province-select" class="span2"><option>省</option></select>
											<select id="region-city-select" class="span2"><option>市</option></select>
											<select id="region-county-select" class="span2"><option>县、区</option></select>
										</div>
									</td>
								</tr>
								<tr>
									<td>选择类别	</td>
									<td><input type="hidden" name="projectCategory.id" id="projectCategory"></td>
								</tr>
								<tr>
									<td colspan="2" class="kind-checkbox">
										<div class="sel-group row-fluid" id="kind-select"	style="width: auto;">
											<div class="laoding-round"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>收益类别	</td>
									<td><input type="hidden" name="projectBenefit.id" id="profitCategory"></td>
								</tr>
								<tr>
									<td colspan="2" class="profit-checkbox">
										<div class="fit-group row-fluid" id="profit-select"	style="width: auto;">
											<div class="laoding-round"></div>
										</div>
									</td>
								</tr>
								
								<tr>
								<tr>
									<td><!-- <span style="color: #e00">*</span> -->详细地址</td>
									<td><input class="detailed_address form-control required"
										type="text" placeholder="自定义地址信息(6-100)字" name="address"
										id="address" value="${project.address}" /></td>
									</tr>
									<tr>
										<td>简要说明</td>
										<td><textarea rows="" cols=""
											placeholder="对服务进行简要描述，不要超过200个字符" id="description"
											name="description" class="form-control activity-brief">${project.description}</textarea></td>
										</tr>
										<tr>
											<td><!-- <span style="color: #e00">*</span> -->封面图片</td>
											<td class="upload-img"><input id="coverId" type="hidden"
												value="${project.photoId }" name="photoId" /><input
												type="file" class="file-input" name="" id="file-input">
												<input type="button" id="cover-upload" value="上传图片"
												class="upload-front" readonly>
												<div style="position: relative; margin-left: 95px;">
													<div id="progress" class="coverId-name">
														<div class="bar" style="width: 0%; position: absolute;"></div>
														图片最佳尺寸为340*200像素，或控制在同等比例，不超过1mb！

													</div>
												</div>
												<div id="coverId-preview"></div>
											</td>
											</tr>
											<tr>
												<td><!-- <span style="color: #e00">*</span> -->服务背景</td>
												<td class="activity-back"><textarea name="activityBackground"
													class="form-control required" id="activityBackground">${project.activityBackground }</textarea>
													<span class="btn btn-success fileinput-button"
													style="display: none;"> <i
													class="glyphicon glyphicon-plus"></i> <span>添加图片</span> <!-- 单选 -->
													<input id="fileupload" type="file" name="files[]">
												</span></td>
											</tr>
											<tr>
														<td><input type="button" class="raise-submit" value="下一步"
																id="startProjectSubmit" /></td>
															</tr>
														</table>
													</form>
												</div>
												<div class="span3" id="projectJj"
												style="position: absolute; right: 0px; top: 0px;">
										
													</div>
												</div>
												<!-- 服务状态 -->

												<div class="tab-pane" id="panel-473511">
													<div class="">
														<div class="show_plan" id="showPlan"></div>
														<div class="showaction clearfix">
															<button id="savePlan" class="raise-submit start_pro_button"
															value="保存">保存</button>
															<button id="updatePlan" class="raise-submit start_pro_button"
															style="display: none;">更新</button>
															<button id="schd-next" class="raise-submit start_pro_button"
															style="display: none;">下一步</button>
														</div>
													</div>
												</div>
												
												<div class="tab-pane" id="panel-473513">
													<div class="show_goods" id="showGoods"></div>
													<div class="show_action">
														<button id="goodsExcuteSave" class="raise-submit start_pro_button"
														value="保存">保存</button>
														<button id="updateGoods" class="raise-submit start_pro_button"
														style="display: none;">更新</button>
														<button id="goods-next" class="raise-submit start_pro_button"
														style="display: none;">下一步</button>
													</div>
												</div>
				<div class="tab-pane" id="panel-473514">
					<div class="prepare">
						<div>
							<font size="4px">准备提交审核</font>
						</div>
						<div>
							<div>1、提交审核后，工作人员会在三个工作日内和您取得联系，并告知您服务申请通过与否；</div>
							<div>2、服务审核期间，您可以随时登录YAMI，修改和完善服务申请表并重新保存提交；</div>
							<div>3、审核通过后，您的服务会立即上线！</div>
						</div>
					</div>
					<hr />
					<div class="details">
				<form id="checkSubmit">
				<input type="hidden" name="id" value="1" id="pid">
				<table class="table">
					<tr>
						<td class="right-a" style="width: 60px;"></td>
						<td></td>
					</tr>
					<tr class="day">
						<td class="right-a"></td>
						<td></td>
					</tr>
					<tr>
						<td colspan="2">您的联系方式</td>
					</tr>
					<tr>
						<td class="right-a"><span class="text-red">*</span>真实姓名</td>
						<td><input type="text" id="userName" name="userRealName"
							value="${project.userRealName }" /></td>
						</tr>
						<tr>
							<td class="right-a"><span class="text-red">*</span>性别</td>
							<td>
								<label for="man" class="" id="label-man">男</label>
								<input type="radio" name="userGender" id="man" checked="checked" value="0">
							
							
								<label for="woman" class="" id="label-woman">女</label><input
								type="radio" name="userGender" id="woman" value="1">
							</td>
						</tr>
						<tr>
							<td class="right-a"><span class="text-red">*</span>电话</td>
							<td><input type="text" id="tel" name="userPhone"
								class="telephone" value="${project.userPhone }" /></td>
							</tr>
							<tr>
								<td class="right-a"><span class="text-red">*</span>QQ</td>
								<td><input type="text" id="qq" name="userQQ"
									class="userQQ" value="${project.userQQ }" /></td>
								</tr>
								<tr>
									<td></td>
									<td><input type="button" id="checkF" class="raise-submit"
										value="提交审核"></td>
									</tr>
								</table>
							</form>
						</div>
					</div>
						</div>
					</div>
					<div id="modal-container-36737777" class="modal hide fade"
					role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true"></button>
						确认删除
					</div>
					<div class="modal-body">
						<p>您真的要删除吗?</p>
					</div>
					<div class="modal-footer">
						<button class="doQr" data-dismiss="modal" aria-hidden="true">确认</button>
						<button class="qx" data-dismiss="modal" aria-hidden="true">取消</button>
					</div>
				</div>
			</div>
						<a href="#top" class="back_top"></a>
					</div>
					<div class="letter_send_seccuss">
						<span class="show_success"></span>提交成功
					</div>
					<script type="text/html" id="kind-select-template">
					<$for(var i = 0;i<projectCategories.length;i++){$>
						<span id="checkb<$=i$>" class="kind-item" value="<$=projectCategories[i].id$>"><$=projectCategories[i].categoryName$></span>
						<$}$>										
						</script>
												   <!-- 收益分类模板 -->
												   <script type="text/html" id="profit-select-template">
												   <$for(var i= 0;i<data.length;i++){$>
	                                               <span id="checkf<$=i$>" class="fit-item" value="<$=data[i].id$>"><$=data[i].categoryName$></span>
	                                                  <$}$>
                                                    </script>
                                                 	<!-- 执行计划 -->
														<script type="text/html" id="showPlan-template">
														<$for(var i = 0;i<schedule.length;i++){$>
															<form id="schedule<$=i+1$>" class="schedule">
															<input name="project.id" value="" type="hidden" class="project_id<$=i+1$>">
															<input name="id" value="<$=schedule[i].id$>" type="hidden">
															<table id="shadTble<$=i$>" class="table"><tr><td class="period-title">
															<input type="hidden" class="stages" name="stage" value="<$=schedule[i].stage$>">成就<$=schedule[i].stage$></td>
															</tr>
															<tr>
															<td>时间</td>
															<td class="datepick-td"><input id="startTime<$=i+1$>" style='width: 200px;' readonly size="16" type="text" value="<$=schedule[i].startDate$>"
															name="startDate" class="form_datetime form-control required start_date"><span style="margin: 0 10px;">至</span>
															<input id="endTime<$=i+1$>" style='width: 200px;' readonly size="16" type="text" value="<$=schedule[i].endDate$>"
															name="endDate" class="form_datetime form-control required end_date"></td>
															</tr>
															<tr class="tr-submit">
															<td>简介</td>
															<td><textarea readonly class="do_plan" name="content" class="form-control required"><$=schedule[i].content$></textarea></td>
															</tr>
															<tr class='do_tr'><td></td><td class='operate'><span class='planEdit' id="<$=i+1$>">编辑</span><span id="del<$=i+1$>" class='delete' data='{"id":"<$=schedule[i].id $>"}'>删除</span></td></tr>
															</table></form>
															<$}$>								
															</script>

															<script type="text/html" id="showGoods-template">
															<$for(var i = 0;i<result.length;i++){$>
																<form id="goodsSetgoodAdit<$=i+1$>" class="goodsSetgoodAdit">
																<input name="id" value="<$=result[i].id$>" type="hidden">
																<input name="projectId" value="<$=result[i].projectId$>" value="<$=result[i].photoId$>" type="hidden" class="project_id">
																<input
																type="hidden" name="code" value="2134">
																<table class="table">
																<tr>
																<td>服务名称<$=i+1$></td>
																<td><input type="text" name="name" id="goodsName<$=i$>" class="goods_name required" value="<$=result[i].name$>" /></td>
																</tr>
																<tr class="">
																<td>服务图片</td>
																<td>
																<div class="portrait goodsPic">
																<span class="change-img" onclick=\"document.getElementById(\'file_upload"+e+"\').click()\"> 上传</span> <input id="photoId<$=i$>" type="hidden" value="<$=result[i].photoId$>" name="photoId" class="pho_id"/>
																<div id="file-preview<$=i$>">
																<img src="<$=result[i].photoUrl$>/250x250"></img>
																</div>
																<label for="correctPortrait" class="correctPortrait"> <input data="<$=i$>" id="file_upload<$=i$>"  type="file" name="photoId" class="correctPortrait upload_f"></input>
																</label>
																</div>
																</td>
																</tr>
																<tr>
																<td>服务介绍</td>
																<td><textarea id="goodsText" name="description" class="required goods_notice"><$=result[i].description$></textarea></td>
																</tr>
																<tr>
																<td>收费标准</td>
																<td><input type="text" name="price" class="price required" value="<$=result[i].price$>">元</td>
																</tr>
																                                                               
																<tr class='do_tr'><td></td><td class='operate'><span class='planEdit' id="goodAdit<$=i+1$>" >编辑</span><span id="delId<$=i+1$>" class='delete'  data='{"id":"<$=result[i].id $>"}'>删除</span></td></tr>
																</table>
																</form>
																<$}$>
																</script>


																<script type="text/html" id="budgetShow-template">
																<$for(var i = 0;i<budget.length;i++){$>
																	<form action="" method="post" id="budgetbudgetEdit<$=i+1$>" class="budgetbudgetEdit">
																	<input type="hidden" value="" name="project.id" class="project_id"> 
																	<input name="id" value="<$=budget[i].id$>" type="hidden">
																	<div class="stage">第<$=budget[i].stage$>阶段</div>
																	<input type="hidden" name="stage" value="<$=budget[i].stage$>"/>
																	<table class="table<$=i$>">
																	<tr>
																	<td class="cost_title">使用时间</td>
																	<td colspan="4" class="edit_do"><input id="startUseTime<$=i+1$>" size="16"  disabled="disabled"
																	type="text" value="<$=budget[i].startDate$>" name="startDate" class="form_datetime"><span>至</span>
																	<input id="endUseTime<$=i+1$>"  disabled="disabled" size="16" type="text" value="<$=budget[i].endDate$>"
																	name="endDate" class="form_datetime"></td>
																	</tr>
																	<tr>
																	<td class="cost_title">分类</td>
																	<td>人力费用</td>
																	<td>服务费用</td>
																	<td>行政费用</td>
																	<td>其他</td>
																	</tr>
																	<tr class="budget_td <$=i$>">
																	<td class="cost_title">费用</td>
																	<td class="edit_do"><input class="<$=i$>" id="laborCosts<$=i$>" type="text" name="laborCosts"
																	value="<$=budget[i].laborCosts$>"></td>
																	<td class="edit_do"><input class="<$=i$>" id="programCosts<$=i$>" type="text"
																	name="programCosts" value="<$=budget[i].programCosts$>"></td>
																	<td class="edit_do"><input class="<$=i$>" id="adminCosts<$=i$>" type="text" name="adminCosts"
																	value="<$=budget[i].adminCosts$>"></td>
																	<td class="edit_do"><input class="<$=i$>" id="otherCosts<$=i$>" type="text" name="otherCosts"
																	value="<$=budget[i].otherCosts$>"></td>
																	</tr>
																	<tr>
																	<td class="cost_title">备注</td>
																	<td colspan="4" class="edit_do"><input type="text" name="remark" value="<$=budget[i].remark$>" id="remark"></td>
																	</tr>
																	<tr>
																	<td class="cost_title">总算</td>
																	<td colspan="4" class="edit_do total_budget" id="total<$=i$>" data="<$=i$>"><$=budget[i].laborCosts+budget[i].programCosts + budget[i].adminCosts + budget[i].otherCosts $></td>
																	</tr>
																	</table>
																	</form>
																	<$}$>										
																	</script>
																	<c:if test="${env == 'production' }">
																	<script type="text/javascript">
																	seajs.use("${ctx}/assets/js-dist/project/project-edit");
																	</script>
																	</c:if>
																	<c:if test="${env != 'production' }">
																	<script type="text/javascript">
																	seajs.use("${ctx}/assets/js/project/project-edit");
																	</script>
																	</c:if>


